﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
using LibNiconico.NiconicoApi.Internal;
using LibNiconico.NiconicoApi.Utils;

namespace LibNiconico.NiconicoApi.PlayerStatus
{
    /// <summary>
    /// ニコニコプレイヤーステータス取得レスポンス
    /// </summary>
    public sealed class NicoGetPlayerStatusResponse : NicoApiInfoXmlResponseBase
    {
        private NicoGetPlayerStatusResponse(XDocument baseDocument) : base(baseDocument) { }

        /// <summary>
        /// 取得したプレイヤーステータスの取得
        /// </summary>
        public NicoPlayerStatus PlayerStatus { get; private set; }

        internal static NicoGetPlayerStatusResponse Parse(XDocument baseDocument)
        {
            return new NicoGetPlayerStatusResponse(baseDocument) 
            { 
                PlayerStatus = NicoPlayerStatus.Parse(baseDocument.Element("getplayerstatus"))
            };
        }

    }
}
